package com.xiaoma.verbal.web.admin;

import java.util.HashMap;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.xiaoma.tpo.utils.Pager;
import com.xiaoma.verbal.service.PrctPracticeAudioService;
import com.xiaoma.verbal.utils.RequestUtils;

@Controller
@RequestMapping("/practice/audio")
public class PracticeAudioManagementAct {
	@Autowired
	private PrctPracticeAudioService prctPracticeAudioService;

	@RequestMapping(value = "/list", method = RequestMethod.GET)
	@ResponseBody
	public Map<String, Object> list( Integer page, Integer rows,
			HttpServletRequest request, ModelMap model) {
		// 当前页
		Map<String, Object> result = new HashMap<String, Object>();
		Pager pager = this.prctPracticeAudioService.list(page, rows);
		result.put("Rows", pager.getList());
		result.put("Total", pager.getTotalCount());
		return result;

	}

}
